#ifndef APPMANAGER_H
#define APPMANAGER_H

#include <QMainWindow>
#include <QtNetwork/QNetworkReply>
#include <QtNetwork/QFtp>
#include <QtCore/QFile>
#include <QtCore/QVector>
#include "versDialog.h"
#include "D:/Programming/C++/WClib/wclib.h"

namespace Ui {
class AppManager;
}

class AppManager : public QMainWindow
{
	Q_OBJECT
public:
	explicit AppManager(QWidget *parent = 0);
	~AppManager();
private slots:
	void showNews();
	void updateTable();
	void about();
	void on_table_itemSelectionChanged();
	void on_getButton_clicked();
	void on_versButton_clicked();
	void ftpDone(bool error);
	void replyFinished(QNetworkReply *data);
private:
	OPT *app;
	int selectedRow;
	QString appVersion;
	QString appChannel;
	QString appName;
	QVector<OPT*> appOptions;
	QNetworkAccessManager *manager;
	QFtp *ftp;
	QString progName;
	QString releaseVer;
	QString betaVer;
	QFile fileProg;
	versDialog *dialog;
	Ui::AppManager *ui;
};

#endif // APPMANAGER_H
